﻿using System;
using System.Linq;
using System.Xml;
using System.Net;
using System.IO;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using Microsoft.Practices.Prism.Regions;
using Microsoft.Practices.Prism.Events;
using Microsoft.Practices.Prism.Commands;
using Microsoft.Practices.Unity;
using DXTools.UI.Core;
using DXTools.UI.Modules.Configuration.Views;
using DXTools.UI.Core.Events;
using System.Collections.Generic;
using DXTools.UI.Core.ViewModel;
using System.Collections.ObjectModel;
using System.Text;
using DXTools.UI.Core.DataProviders;
using DXTools.Core.CrmSdk;
using DXTools.UI.Core.Model;
using DXTools.Core.Model;
using DXTools.Core.Enum;
using DXTools.UI.Modules.Configuration.Model;
using DXTools.UI.Modules.Configuration.Events;



namespace DXTools.UI.Modules.Configuration.ViewModels
{
    public class DonateViewModel : ViewModelBase
    {
        #region Private Attributes
        private const string HEADER_INFO = "Donate to Dynamics XRM Tools";
        private ICRMDataProvider crmDataProvider;
        #endregion

        #region Properties

        private String _donateUrl;
        public String DonateUrl
        {
            get
            {
                return DXTools.Core.ClientScript.GetServerUrl() + "/WebResources/dxtools_/Paypal.htm";
            }
            set
            {
                _donateUrl = value;
                RaisePropertyChanged("DonateUrl");
            }
        }
        
        #endregion

        #region Constructors

        public DonateViewModel(IRegionManager regionManager, IEventAggregator eventAggregator, IUnityContainer container)
            :base(regionManager,eventAggregator,container)
        {
            this.HeaderInfo = HEADER_INFO;

            this.CloseViewCommand = new DelegateCommand<object>(this.CloseView, this.CanCloseView);
            //this.SearchCommand = new DelegateCommand<object>(this.Search, this.CanSearch);

            //crmDataProvider = new CRMDataProvider();

            //eventAggregator.GetEvent<UpdateStatusEvent>().Subscribe(UpdateToolsStatus);

            




        }

        #endregion

        #region Close

         private void CloseView(object commandArg)
         {
             base.CloseView();
         }
         private bool CanCloseView(object commandArg)
         {
             return true;
         }       

        #endregion

       


    }
}
